package main

import (
	"fmt"
)

func main() {
	bc := NewBlockChain()
	bc.AddBlock("Jay大卖")
	bc.AddBlock("范特西大卖")
	bc.AddBlock("八度空间大卖")
	bc.AddBlock("叶惠美大卖")
	for i, block := range bc.blocks {

		fmt.Printf("当前区块高度=============：%d\n", i)
		fmt.Printf("前区块hash：%x\n", block.PreHash)
		fmt.Printf("当前区块hash：%x\n", block.Hash)
		fmt.Printf("当前区块data：%s\n", block.Data)
	}
}
